package io;

import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;

/**
 * @Author Justin Parker
 * @Date 2024/7/17 0017 11:25
 * @Version 1.0
 */
public class PrintWriteDemo02 {
    public static void main(String[] args) throws FileNotFoundException {
        PrintWriter pw = new PrintWriter(
                new BufferedOutputStream(
                        new FileOutputStream("./pw.txt")),true);
        //2.写数据
        pw.println("hello");
        pw.println("都得死");
        //3.关闭流对象
        pw.close();
    }
}
